package com.ruoyi.huanghefd.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.huanghefd.domain.UserByRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author gnplum
 * @Date 2024/1/22 22:36
 * @PackageName:com.ruoyi.huanghefd.mapper
 * @ClassName: UserByRoleMapper
 * @Description: 用户角色映射类
 * @Version 1.0
 */
@Mapper
public interface UserByRoleMapper extends BaseMapper<UserByRole> {
    /**
     * @param deptId
     * @param userName
     * @param roleKey
     * @param startIndex
     * @param pageSize
     * @return java.util.List<com.ruoyi.huanghefd.domain.UserByRole>
     * @Author gnplum
     * @Description //查询不同角色对应的人员类型
     * @Date 22:40 2024/1/22
     **/
    List<UserByRole> queryUserByRoleByPage(@Param("deptId") String deptId, @Param("userName") String userName, @Param("roleKey") String roleKey, @Param("startIndex") int startIndex, @Param("pageSize") int pageSize);

    /**
     * @param deptId
     * @param userName
     * @param roleKey
     * @return int
     * @Author gnplum
     * @Description //查询不同角色对应的人员类型 总数
     * @Date 22:59 2024/1/22
     **/
    int getUserByRoleNum(@Param("deptId") String deptId, @Param("userName") String userName, @Param("roleKey") String roleKey);
}